You are here: COM Interface > Interfaces > IIndexJob Interface > IIndexJob::StatusHandler Property
IIndexJob::StatusHandler Property
Close
dtSearch Text Retrieval Engine Programmer's Reference
IIndexJob::StatusHandler Property
Syntax
IDL
__property IDispatch * StatusHandler;

Object to receive status update notifications during indexing. Can be used to provide a progress display and to provide an opportunity to cancel an index update.

The StatusHandler is an object that will receive status updates from the engine during indexing. This can be useful to give the user a status display (such as a progress bar) and an opportunity to cancel an indexing job in progress. In a Visual Basic program, the StatusHandler can be any object (including a form) that has the following three methods:

Public Sub ReceiveProgress(ByVal percent As Long) Public Sub ReceiveStep(ByVal step As Long) Public Sub ReceiveFileInfo(ByVal name As String, ByVal percentDone As Long) Public Function CheckForAbort() As Long

 

The following explains the purposes of each of the interfaces in the StatusHandler object: 

ReceiveProgress - Called with the percentage completion (0 - 100) of the current indexing task. 

ReceiveStep - Called with a IndexingStep value identifying the current step in the indexing process. 

ReceiveFileInfo - Called with the name of the file being indexed and the percentage of completion (0 = starting, 100 = done) 

CheckForAbort - Called to determine whether the indexing task should be cancelled. There are two ways to cancel an indexing job. An "immediate" cancel terminates indexing immediately and restores the index to its state before the indexing job began. (If ActionCreate was set to true, the index will be empty.) An ordinary cancel stops indexing new documents, finishes processing the current document, and stores information about documents already processed. Return values for CheckForAbort are: 0 = do not cancel; -1 = cancel; -2 = cancel immediately.